/*
 * @Author: hcluo
 * @Date: 2020-08-27 13:19:01
 * @LastEditors: hcluo
 * @LastEditTime: 2020-08-28 23:48:21
 * @Description:
 */
module.exports = function(api) {
  const presets = ['react-app'];
  const plugins = [
    '@babel/plugin-proposal-nullish-coalescing-operator',
    '@babel/plugin-proposal-optional-chaining',
    // ['import', { libraryName: 'antd', libraryDirectory: 'es', style: 'css' }],
    ['import', { libraryName: '@wind/wind-ui', style: 'css' }],
  ];
  if (api.env('development')) {
    plugins.push('react-hot-loader/babel');
  }
  return { presets, plugins };
};
